x86/mm: skip incrementing mfn if it is not a valid mfn
authorWei Liu <wei.liu2@citrix.com>
Fri, 9 Mar 2018 17:20:14 +0000 (17:20 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 5 Apr 2018 17:43:42 +0000 (18:43 +0100)
commitacf92c83b58e404374300397801deb80fb8d883e
treede6533ddb19c14869fba17c1af05f8c7b8c17237
parent454efb2a31b64b98e3dd55c083ce41b87375faa6
x86/mm: skip incrementing mfn if it is not a valid mfn

In a follow-up patch, some callers will be switched to pass
INVALID_MFN instead of zero for non-present mappings. So skip
incrementing mfn if it is not a valid one.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/mm.c